package com.atguigu.gmall.order.service;

import com.atguigu.gmall.model.enums.ProcessStatus;
import com.atguigu.gmall.model.order.OrderDetail;
import com.atguigu.gmall.model.order.OrderInfo;

import java.util.List;
import java.util.Map;

public interface OrderInfoService {

    //2.校验库存
    boolean hasStock(OrderDetail orderDetail);

    //3.提交订单(保存订单主表,订单详情表)
    Long insertOrder(OrderInfo orderInfo);

    //根据订单id查询订单对象
    OrderInfo getOrderInfo(Long orderId);

    //修改订单状态
    void updateOrderStatus(Long orderID, ProcessStatus processStatus);

    //初始化库存那边需要的数据
    Map initWareOrder(Long orderID);

    //初始化库存那边需要的数据
    Map initWareOrder(OrderInfo orderInfo);

    //1.开始拆单, 1张订单 拆分后 成n张订单
    List<OrderInfo> orderSplit(Long orderId, String wareSkuMap);
}
